import {req_get_auth, req_post_auth} from "./axiosFun.js";
import {HOST} from '@/api/hosts'

export const getAllCarRecords = (params) => {
    const url = `${HOST}/carRecord/page`;
    return req_get_auth("get", url, params);
};

export const addCarRecord = (data) => {
    const url = `${HOST}/carRecord`;
    return req_post_auth("post", url, data);
};

export const deleteCarRecord = (id) => {
    const url = `${HOST}/carRecord/${id}`;
    return req_post_auth("delete", url);
};

export const updateCarRecord = (data) => {
    const url = `${HOST}/carRecord`;
    return req_post_auth("put", url, data);
};
